package org.littlesun.management.address;

import java.util.ArrayList;
import java.util.List;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

@AllArgsConstructor(access=AccessLevel.PRIVATE)
@ToString(of={"name"})
@EqualsAndHashCode(of={"name"})
public class Zone implements Area {

	@Getter private City city;
	@Getter private String name;
	@Getter private List<String> aliases = new ArrayList<String>();
	@Getter private List<Road> roads = new ArrayList<Road>();

	public Zone(City city, String name) {
		this(city, name, new ArrayList<String>(), new ArrayList<Road>());
	}
	
	public Zone(City city, String name, List<Road> roads) {
		this(city, name, new ArrayList<String>(), new ArrayList<Road>(roads));
	}

	public void addRoad(Road road) {
		if (!this.roads.contains(road)) {
			this.roads.add(road);
		}
	}
	
}
